﻿#region File Description
//-----------------------------------------------------------------------------
// PhilippScreen.cs
//-----------------------------------------------------------------------------
#endregion

#region Using Statements
using System;
using System.Threading;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
#endregion

namespace kinect_music_shooter.Screens
{
    class DifficultyScreen : MenuScreen
    {
        #region Fields

        string path;
        int[] parameters;

        #endregion

        #region Initialization

        public DifficultyScreen(string absolutepath)
            : base("Difficulty")
        {
            this.path = absolutepath;
            parameters = new int[1];

            MenuEntry easyMenuEntry = new MenuEntry("easy");
            easyMenuEntry.Selected += easySelected;
            MenuEntries.Add(easyMenuEntry);

            MenuEntry nomalMenuEntry = new MenuEntry("normal");
            nomalMenuEntry.Selected += normalSelected;
            MenuEntries.Add(nomalMenuEntry);

            MenuEntry insaneMenuEntry = new MenuEntry("insane");
            insaneMenuEntry.Selected += insaneSelected;
            MenuEntries.Add(insaneMenuEntry);
        }

        #endregion

        void easySelected(object sender, PlayerIndexEventArgs e)
        {
            parameters[0] = 0;
            LoadingScreen.Load(ScreenManager, false, e.PlayerIndex, new GameplayScreen(path, parameters));
            KinectMusicShooterGame.musicGraph.setSong(path);
        }

        void normalSelected(object sender, PlayerIndexEventArgs e)
        {
            parameters[0] = 1;
            LoadingScreen.Load(ScreenManager, false, e.PlayerIndex, new GameplayScreen(path, parameters));
            KinectMusicShooterGame.musicGraph.setSong(path);
        }

        void insaneSelected(object sender, PlayerIndexEventArgs e)
        {
            parameters[0] = 2;
            LoadingScreen.Load(ScreenManager, false, e.PlayerIndex, new GameplayScreen(path, parameters));
            KinectMusicShooterGame.musicGraph.setSong(path);
        }

    }
}

